package cn.zhf.shop.mapper;

import cn.zhf.shop.entity.Shopping;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface ShoppingMapper {
    int deleteByPrimaryKey(Integer shoppingId);

    int insert(Shopping record);

    int insertSelective(Shopping record);

    Shopping selectByPrimaryKey(Integer shoppingId);

    int updateByPrimaryKeySelective(Shopping record);

    int updateByPrimaryKey(Shopping record);

    Integer countByUserId(@Param("userId") String userId);

    List<Shopping> selectAllByUserId(@Param("userId") String userId);

    int updateLessonNumByShoppingId(@Param("updatedLessonNum") Integer updatedLessonNum, @Param("shoppingId") Integer shoppingId);

    Shopping selectByUserIdAndLessonId(@Param("userId")String userId,@Param("lessonId")Integer lessonId);




}